package com.jmebananas.game.state;

import com.jme.scene.Spatial;
import com.jmebananas.renderer.pass.AdvancedPassManager;
import com.jmebananas.renderer.pass.TileRenderPass;
import com.jmex.game.StandardGame;

/**
 * TileGameState
 *
 * @author Glenn Powell
 *
 */
public class TileGameState extends AdvancedGameState {
	
	private TileRenderPass rootPass = null;
	

	public TileGameState(String name, StandardGame game) {
		super(name, game);
	}

	public TileGameState(String name, StandardGame game, AdvancedPassManager passManager) {
		super(name, game, passManager);
	}

	protected void init() throws Exception {
		rootPass = new TileRenderPass();
		rootPass.setUpdateGeometricState(true);
		addPass(rootPass);
	}
	
	public TileRenderPass getTileRenderPass() {
		return rootPass;
	}
	
	public void add(Spatial spatial) {
		rootPass.add(spatial);
	}

}
